<?php
/**
 * @package Joomla.JoomShopping.Products
 * @author Vadim Meling
 * @website http://dell3r.ru/
 * @email dell3r@yandex.ru
 * @copyright Copyright by Dell3r Ltd. All rights reserved.
 * @license The MIT License (MIT);
 */
Defined('_JEXEC') Or Die('Restricted access');

jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');

$VersionAddon	= "1.4";
$VersionJSh		= "3.7";
$VersionPlus	= "+";
$AddonName		= "Plus and Minus Count Product";
$AddonAlias		= "plus_minus_count_product";
$PluginDirs		= Array("JShoppingProducts", "JShoppingCheckout");

$DataBase = JFactory::getDBO();
ForEach($PluginDirs As $PluginDir){
	$PluginDir = StrToLower($PluginDir);
	$DataBase->setQuery("DELETE FROM `#__extensions` WHERE `element` = \"".$AddonAlias."\" AND `folder` = \"".$PluginDir."\"");
	$DataBase->query();
	JFolder::Delete(JPATH_ROOT."/plugins/".$PluginDir."/".$AddonAlias);
}
JFile::Delete(JPATH_ROOT."/administrator/components/com_jshopping/install/addon_".$AddonAlias."_uninstall.php");
?>